package com.hb.trans.mvp.contract

import android.location.Location
import com.basiclib.inter.IModel
import com.basiclib.inter.IMvpView
import com.hb.trans.bean.Base
import com.hb.trans.bean.City
import com.hb.trans.bean.Geocoder
import com.hb.trans.bean.School
import io.reactivex.Observable

interface SchoolsContract {

    interface View : IMvpView {
        fun setupSchoolData(data: MutableList<School>?)
        fun setCounties(counties: MutableMap<String, MutableList<City>>?)
        fun setCurrentLocationCity(province: String, city: String, district: String)
    }


    interface Model : IModel {
        fun getSchools(district: String): Observable<Base<MutableList<School>>>
        fun findSchools(name: String): Observable<Base<MutableList<School>>>
        fun getCounties(): Observable<Base<MutableMap<String, MutableList<City>>>>
        fun getLocationInfo(location: Location): Observable<Geocoder>
    }
}